# 在Makefile 中使用通配符，自动推导 *.c *.o
objects := $(patsubst %.c,%.o,$(wildcard *.c))
main: $(objects)
	cc -o foo $(objects)  

clean:
	rm foo $(objects)
